package com.github.zhijieqing.socket.cluster.common.storage;

import com.github.zhijieqing.socket.cluster.common.node.SocketServerNode;

import javax.websocket.Session;
import java.util.Collection;
import java.util.List;
import java.util.Map;
import java.util.Set;

public interface ClientStorage {
    void put(String clientId, Session session, SocketServerNode socketServerNode);
    void put(String clientId, String sessionId, SocketServerNode socketServerNode);
    void put(SocketServerNode socketServerNode);
    void remove(SocketServerNode socketServerNode);
    boolean contains(String clientId);
    boolean currentNodeContains(String clientId, SocketServerNode currentServerNode);
    void remove(String clientId);
    void remove(String clientId,SocketServerNode socketServerNode);
    void remove(String clientId,Session session,SocketServerNode socketServerNode);
    SocketServerNode getOne(String clientId);
    Collection<SocketServerNode> get(String clientId);
    Map<String, Set<String>> getSessionClientCache();
    Map<String, Set<String>> getClientSessionCache();
}
